package GraphicInterface;
import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.*;
import javax.swing.plaf.IconUIResource;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MainMenu extends javax.swing.JFrame {


	private JSeparator jSeparator1;
	private JMenuItem alocarEventoMenuItem;
	private JMenuItem localizarEventoMenuItem;
	private JMenuItem AdicionarEventoMenuItem;
	private JMenu jMenu4;
	private JMenuItem RemoverSalaMenuItem;
	private JSeparator jSeparator2;
	private JMenuItem removerSalaMenuItem;
	private JMenuItem localizarSalaMenuItem;
	private JMenuItem adicionarSalaMenuItem;
	private JMenuItem desalocarSalaMenuItem;
	private JMenu jMenu3;
	private JMenuBar jMenuBar1;
	private JPanel jPanelAdicionarSala;
	private JPanel jPanelTelaInicial;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				MainMenu inst = new MainMenu();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public MainMenu() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				jPanelTelaInicial = new TelaInicial();
				getContentPane().add(jPanelTelaInicial, BorderLayout.CENTER);
			}
			{
				jPanelAdicionarSala = new AdicionarSala(jPanelTelaInicial);
				getContentPane().add(jPanelAdicionarSala, BorderLayout.NORTH);
				jPanelAdicionarSala.setPreferredSize(new java.awt.Dimension(784, 333));
				jPanelAdicionarSala.setVisible(false);
			}
			{
			}
			setSize(800, 400);
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				{
					jMenu3 = new JMenu();
					jMenuBar1.add(jMenu3);
					jMenu3.setText("Salas");
					{
						adicionarSalaMenuItem = new JMenuItem();
						jMenu3.add(adicionarSalaMenuItem);
						adicionarSalaMenuItem.setText("Adicionar");
						adicionarSalaMenuItem.addMouseListener(new MouseAdapter() {
							public void mousePressed(MouseEvent evt) {
								adicionarSalaMenuItemMousePressed(evt);
							}
						});
					}
					{
						localizarSalaMenuItem = new JMenuItem();
						jMenu3.add(localizarSalaMenuItem);
						localizarSalaMenuItem.setText("Localizar");
					}

					{
						jSeparator2 = new JSeparator();
						jMenu3.add(jSeparator2);
					}
					{
						RemoverSalaMenuItem = new JMenuItem();
						jMenu3.add(RemoverSalaMenuItem);
						RemoverSalaMenuItem.setText("Remover");
					}
				}
				{
					jMenu4 = new JMenu();
					jMenuBar1.add(jMenu4);
					jMenu4.setText("Evento");
					{
						AdicionarEventoMenuItem = new JMenuItem();
						jMenu4.add(AdicionarEventoMenuItem);
						AdicionarEventoMenuItem.setText("Adicionar");
					}
					{
						localizarEventoMenuItem = new JMenuItem();
						jMenu4.add(localizarEventoMenuItem);
						localizarEventoMenuItem.setText("Localizar");
					}
					{
						alocarEventoMenuItem = new JMenuItem();
						jMenu4.add(alocarEventoMenuItem);
						alocarEventoMenuItem.setText("Alocar");
					}
					{
						jSeparator1 = new JSeparator();
						jMenu4.add(jSeparator1);
					}
					{
						desalocarSalaMenuItem = new JMenuItem();
						jMenu4.add(desalocarSalaMenuItem);
						desalocarSalaMenuItem.setText("Desalocar");
					}
					{
						removerSalaMenuItem = new JMenuItem();
						jMenu4.add(removerSalaMenuItem);
						removerSalaMenuItem.setText("Remover");
					}
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void adicionarSalaMenuItemMouseClicked(MouseEvent evt) {
		System.out.println("adicionarSalaMenuItem.mouseClicked, event="+evt);
		jPanelTelaInicial.setVisible(false);
		jPanelAdicionarSala.setVisible(true);
	}
	
	private void adicionarSalaMenuItemMousePressed(MouseEvent evt) {
		System.out.println("adicionarSalaMenuItem.mousePressed, event="+evt);
		jPanelTelaInicial.setVisible(false);
		jPanelAdicionarSala.setVisible(true);
	}

}
